﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace JYJ.AiYard.Migrations
{
    public partial class Add_YardIssuedCard : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Tb_YardIssuedCard",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    User_Id = table.Column<long>(maxLength: 65, nullable: true),
                    CardTypeId = table.Column<int>(maxLength: 65, nullable: true),
                    CardNo = table.Column<string>(maxLength: 65, nullable: true),
                    Status = table.Column<int>(maxLength: 65, nullable: false),
                    PlateColor = table.Column<int>(maxLength: 65, nullable: false),
                    RecordType = table.Column<string>(maxLength: 65, nullable: true),
                    PlateNo = table.Column<string>(maxLength: 65, nullable: true),
                    BeginTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    EndTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    CarColor = table.Column<string>(maxLength: 65, nullable: true),
                    CarType = table.Column<string>(maxLength: 65, nullable: true),
                    CarImg = table.Column<string>(maxLength: 65, nullable: true),
                    IDNO = table.Column<string>(maxLength: 150, nullable: true),
                    Memo = table.Column<string>(maxLength: 512, nullable: true),
                    Deposit = table.Column<decimal>(maxLength: 65, nullable: true),
                    Account = table.Column<decimal>(maxLength: 65, nullable: true),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_YardIssuedCard", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Tb_YardIssuedCard",
                schema: "Dbo");
        }
    }
}
